package P5735;
//P5735 【深基7.例1】距离函数  要注意输入的数据类型
import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner ( System.in );
		double[][] tar = new double[3][2];
		for ( int i = 0; i < 3; i++ ) {
			for ( int j = 0; j < 2; j++ ) {
				int in = scan.nextInt();
				tar[i][j] = in;
			}
		}
		
		double a = Math.sqrt( (tar[1][0] - tar[0][0]) * (tar[1][0] - tar[0][0]) + (tar[1][1] - tar[0][1]) * (tar[1][1] - tar[0][1]) );
		double b = Math.sqrt( (tar[2][0] - tar[1][0]) * (tar[2][0] - tar[1][0]) + (tar[2][1] - tar[1][1]) * (tar[2][1] - tar[1][1]) );
		double c = Math.sqrt( (tar[2][0] - tar[0][0]) * (tar[2][0] - tar[0][0]) + (tar[2][1] - tar[0][1]) * (tar[2][1] - tar[0][1]) );
		double C = a + b + c;
		System.out.println(String.format("%.2f",C));
	
	}
}
